Skip to content

feat(desktop): explain why automatic work did not start in inbox activity - #107913

Closed
posthog[bot] wants to merge 1 commit into
masterfrom
posthog-self-driving/featdesktop-explain-why-automatic-acad31
Closed

posthog[bot] wants to merge 1 commit into
masterfrom
posthog-self-driving/featdesktop-explain-why-automatic-acad31

Conversation

@posthog

@posthog posthog Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem

  • A person who reviews a report in the Desktop Inbox cannot see why automatic work did not start when a duplicate, a dependency, or a parent report held it back.
  • #104402 added the autostart_skip activity record and the web Inbox view for it. Desktop did not follow.
  • The Desktop normalizer had no branch for autostart_skip. The row fell to the generic fallback, which reads only content.content, so the row showed the raw type name and "No preview available."

Origin

  • Scout: a custom scout
  • First signal: 2026-09-28
  • Inbox report: open
  • Task started by: auto-start, after the report was rated P3 and ready to fix

Changes

  • Activity now shows a "Work not started" entry with the reason badge (Duplicate, Waiting on a dependency, Tracked by other reports) and the backend detail line.
  • When the record names a related report, an "Open related report" button opens it in the app through the existing useOpenInboxReport flow.
  • The API client normalizes autostart_skip rows into a typed artefact. A row with an unknown skip_reason still falls back to the degraded preview.
  • Mechanical: the new artefact type and reason labels live in the shared domain types, beside the other artefact shapes.

autostart-skip

How did you test this code?

  • New ArtefactLogList.test.tsx: each of the three reasons shows the title, the reason label and the detail, and does not show "No preview available." Clicking the link opens the linked report id. Before this change the row rendered as an unknown type.
  • posthog-client.test.ts: an autostart_skip row joins the "normalizes every backend artefact type without dropping rows" fixture, so it must stay a typed, non-degraded row.
  • Ran the Vitest suites for packages/ui inbox detail and packages/api-client, tsc --noEmit for shared, api-client and ui, and Biome.
  • Rendered the three rows in Storybook with a temporary story and headless Chromium (screenshot above). The story is not committed.
  • Not checked: the full Desktop app against a live backend.

Release status

  • No feature flag controls this change
  • This change is behind a feature flag and is not available to users
  • This change makes a previously flagged feature available to everyone

Automatic notifications

  • Publish to changelog?

Docs update

None.

🤖 Agent context

Autonomy: Fully autonomous

Agent: PostHog Desktop cloud task, Claude Code, Opus 5.5 (claude-opus-5-5)

  • Mirrors the web Inbox reason labels from #104402 so both surfaces use the same words.
  • The link uses a right-arrow icon, not the external-link icon, because it stays inside the app.
  • No new analytics event: the report detail open tracker already records previous_report_id when the linked report opens.
  • Duplicate search: no open PR covers autostart_skip in Desktop.
  • The local CodeRabbit pass was skipped because this is a cloud task.
  • Public artifact: all fixture data is invented.

Created with PostHog Desktop from this inbox report.

🤖 Generated with Claude Code

…vity

Desktop showed autostart_skip activity rows as an unknown type with no preview. Normalize the payload and render "Work not started" with the reason, the detail, and an in-app link to the related report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: 8276e6c7-677c-4a78-8eb9-11956e924d80
@posthog posthog Bot added the self-driving label Sep 28, 2026
@trunk-io

trunk-io Bot commented Sep 28, 2026

Copy link
Copy Markdown

Merging to master in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

✅ Trunk lane — non-backend lane (fe:product:desktop)

This PR is assigned to the non-backend lane (fe:product:desktop). It does not run backend Python tests and may merge in parallel with PRs in other lanes.

✅ Duplication (Python) — clean

New Python code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

✅ Duplication (TypeScript) — clean

New TypeScript code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

⚠️ Comment density — 3% of added code lines are comments (6 of 185)

This section warns when comments are more than 3% of the code lines a PR adds, and alerts above 6%. Before agent-assisted PRs, the typical share was about 2%. Only full-line comments count. Docstrings, generated files, snapshots, migrations, and workflow files are left out.

Comments that restate the code, record how the change came about, or narrate the next line add noise for the next reader. Keep the comments that explain a reason the code cannot show, and remove the rest. See .agents/skills/writing-code-comments/SKILL.md for the house rules.

Files with the most added comment lines:

File Comment lines Added lines
products/desktop/packages/shared/src/domain-types.ts 6 27

This check does not block merging. It updates on every push and clears when the share drops.

@github-actions github-actions Bot added the feature/desktop Feature Tag: Desktop label Sep 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 4329345.

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

📝 Walkthrough

Walkthrough

The API client now validates and normalizes autostart_skip artefacts using shared reason labels. The inbox displays each skip reason and detail. When a linked report ID is present, it displays an action to open that report. Tests cover normalization, reason labels, detail text, and the linked-report action.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to 43293

The new inbox entry needs a component replacement to meet desktop UI requirements. No functional failure was established, so the remaining merge risk is bounded.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 43293

The new related-report action uses the existing report-opening flow, which checks access before navigating. No security issue was established, although the server-side authorization behind that check was not independently verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The new actionable input is a report ID from server-provided artefact content. Its observed downstream path is the existing authenticated, current-team report lookup, not a new privileged operation.

Trust Boundaries and Controls

  • observed — The normalizer accepts only string linked IDs, while malformed reasons take a non-actionable fallback path. For valid rows, the opening hook checks for an authenticated client and a retrievable report before navigation.
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The description is complete and stands alone. It includes the problem, user-visible changes, screenshot, testing details and limitations, release status, documentation status, and agent context. The r…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: PostHog/posthog/.coderabbit.yaml

Review profile: QUIET

Plan: Enterprise

Run ID: 0e05f1d9-1826-4c31-a733-9016cd6f33c7

📥 Commits

Reviewing files that changed from the base of the PR and between 25d8646 and 4329345.

📒 Files selected for processing (5)
  • products/desktop/packages/api-client/src/posthog-client.test.ts
  • products/desktop/packages/api-client/src/posthog-client.ts
  • products/desktop/packages/shared/src/domain-types.ts
  • products/desktop/packages/ui/src/features/inbox/components/detail/ArtefactLogList.test.tsx
  • products/desktop/packages/ui/src/features/inbox/components/detail/ArtefactLogList.tsx

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 4 remain after this review.

Comment on lines +248 to +250
<Flex direction="column" gap="1">
<Flex align="center" gap="2" wrap="wrap">
<Badge color="gray" variant="soft">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

rg -n 'Radix|UI Components|@posthog/quill' products/desktop/AGENTS.md products/desktop/packages/ui/AGENTS.md products/desktop/.storybook/AGENTS.md
sed -n '1,35p' products/desktop/packages/ui/src/features/inbox/components/detail/ArtefactLogList.tsx
sed -n '240,275p' products/desktop/packages/ui/src/features/inbox/components/detail/ArtefactLogList.tsx

Repository: PostHog/posthog

Length of output: 6619


Replace the new Radix components.

products/desktop/AGENTS.md bans Radix components in desktop code, not only in Storybook. Replace the new Flex and Badge usage in AutostartSkipBody with @posthog/quill components or div elements with Tailwind classes.

@hosthog

hosthog Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

HostHog preview — posthog-desktop-web

The previews for this PR have been torn down and no longer serve.

@scheduled-actions-posthog

Copy link
Copy Markdown
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, please remove the stale label – otherwise this will be closed in another week. If you want to permanently keep it open, use the waiting label.

@scheduled-actions-posthog

Copy link
Copy Markdown
Contributor

This PR was closed due to lack of activity. Feel free to reopen if it's still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant